--------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  code_05_Stata_Tables_A1_A2_A7.log
  log type:  text
 opened on:   8 Nov 2022, 21:54:54

. do "code_05_Stata_Tables_A1_A2_A7.do"

. *** Replication of Tables A1, A2, A7
. 
. * CHANGE THIS
. *cd /path/to/directory
. cd "02_appendix_replication"
02_appendix_replication

. 
. clear

. 
. use "data_YLE_main.dta"

. 
. gen percent_pop_arrivals = Refugeespercapita * 100

. 
. label def refugees 1 "Strongly agree" 2 "Somewhat agree" 3 "Somewhat disagree" 4 "Strongly disagree"

. 
. label val refugees refugees

. 
. * first reversing the scale
. 
. vreverse refugees, gen(ref_2)

. 
. *******************************************************************************
. 
. *** TABLES A1 and A2
. 
. * Parties 1= SDP, 2=KOK 3 = KESK 4 = VAS 5 = VIHR 6 = RKP 7 = KD 10 = PS 
. 
. * per party shares of stances:
. 
. tab ref_2 party if year == 2012, column nofreq

                  |                               party
            ref_2 |         1          2          3          4          5          6 |     Total
------------------+------------------------------------------------------------------+----------
Strongly disagree |      4.09       6.25       7.71       2.78       0.29       1.54 |      7.87 
Somewhat disagree |     18.30      27.08      33.28      11.30       3.67      10.94 |     23.13 
   Somewhat agree |     48.71      49.58      46.07      37.04      33.68      42.21 |     42.94 
   Strongly agree |     28.89      17.09      12.94      48.88      62.36      45.30 |     26.06 
------------------+------------------------------------------------------------------+----------
            Total |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 


                  |                               party
            ref_2 |         7          8         10         11         15         21 |     Total
------------------+------------------------------------------------------------------+----------
Strongly disagree |      2.03       0.54      32.95      12.50      33.33       5.00 |      7.87 
Somewhat disagree |     16.45       1.62      39.07      35.00      11.11      15.00 |     23.13 
   Somewhat agree |     55.03      24.86      23.17      27.50      22.22      20.00 |     42.94 
   Strongly agree |     26.50      72.97       4.81      25.00      33.33      60.00 |     26.06 
------------------+------------------------------------------------------------------+----------
            Total |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 


                  |         party
            ref_2 |       122        500 |     Total
------------------+----------------------+----------
Strongly disagree |      7.77      15.36 |      7.87 
Somewhat disagree |     14.56      24.74 |     23.13 
   Somewhat agree |     43.69      41.67 |     42.94 
   Strongly agree |     33.98      18.23 |     26.06 
------------------+----------------------+----------
            Total |    100.00     100.00 |    100.00 

. 
. * means and standard deviations per party:
. 
. sum ref_2 if (year == 2012 & party ==  1), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs               3,229
25%            3              1       Sum of wgt.       3,229

50%            3                      Mean           3.024156
                        Largest       Std. dev.      .7969341
75%            4              4
90%            4              4       Variance        .635104
95%            4              4       Skewness      -.5280595
99%            4              4       Kurtosis       2.851932

. sum ref_2 if (year == 2012 & party ==  2), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            2              1       Obs               4,173
25%            2              1       Sum of wgt.       4,173

50%            3                      Mean           2.774982
                        Largest       Std. dev.      .8008427
75%            3              4
90%            4              4       Variance        .641349
95%            4              4       Skewness      -.3039387
99%            4              4       Kurtosis       2.686613

. sum ref_2 if (year == 2012 & party ==  3), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            2              1       Obs               4,033
25%            2              1       Sum of wgt.       4,033

50%            3                      Mean            2.64245
                        Largest       Std. dev.      .8018475
75%            3              4
90%            4              4       Variance       .6429595
95%            4              4       Skewness      -.1649771
99%            4              4       Kurtosis       2.577501

. sum ref_2 if (year == 2012 & party ==  4), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs               1,655
25%            3              1       Sum of wgt.       1,655

50%            3                      Mean           3.320242
                        Largest       Std. dev.      .7815403
75%            4              4
90%            4              4       Variance       .6108053
95%            4              4       Skewness      -.9767118
99%            4              4       Kurtosis        3.37357

. sum ref_2 if (year == 2012 & party ==  5), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            2              1
 5%            3              1
10%            3              1       Obs               1,743
25%            3              1       Sum of wgt.       1,743

50%            4                      Mean           3.581182
                        Largest       Std. dev.      .5781432
75%            4              4
90%            4              4       Variance       .3342496
95%            4              4       Skewness      -1.112412
99%            4              4       Kurtosis        3.71398

. sum ref_2 if (year == 2012 & party ==  6), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs                 777
25%            3              1       Sum of wgt.         777

50%            3                      Mean           3.312741
                        Largest       Std. dev.      .7259937
75%            4              4
90%            4              4       Variance       .5270668
95%            4              4       Skewness      -.7970004
99%            4              4       Kurtosis       3.146404

. sum ref_2 if (year == 2012 & party ==  7), d 

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs                 985
25%            3              1       Sum of wgt.         985

50%            3                      Mean           3.059898
                        Largest       Std. dev.      .7124517
75%            4              4
90%            4              4       Variance       .5075874
95%            4              4       Skewness      -.4244544
99%            4              4       Kurtosis       3.033994

. sum ref_2 if (year == 2012 & party == 10), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            1              1       Obs               1,994
25%            1              1       Sum of wgt.       1,994

50%            2                      Mean           1.998495
                        Largest       Std. dev.      .8684107
75%            3              4
90%            3              4       Variance       .7541372
95%            3              4       Skewness       .4443162
99%            4              4       Kurtosis       2.346612

. 
. * per party shares of stances:
. 
. tab ref_2 party if year == 2017, column nofreq

                  |                               party
            ref_2 |         1          2          3          4          5          6 |     Total
------------------+------------------------------------------------------------------+----------
Strongly disagree |      2.82       4.60       5.47       1.75       0.92       1.22 |      7.96 
Somewhat disagree |     10.95      17.34      22.20       6.43       1.74       3.12 |     14.80 
   Somewhat agree |     46.41      51.64      50.97      28.86      23.48      25.07 |     39.90 
   Strongly agree |     39.82      26.42      21.36      62.96      73.86      70.60 |     37.34 
------------------+------------------------------------------------------------------+----------
            Total |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 


                  |                               party
            ref_2 |         7          8         10         11         15        122 |     Total
------------------+------------------------------------------------------------------+----------
Strongly disagree |      1.94       3.64      53.30      15.38      16.67       6.00 |      7.96 
Somewhat disagree |     10.56       1.82      32.16      19.23      33.33       8.00 |     14.80 
   Somewhat agree |     51.29       8.18      11.96      50.00      25.00      29.00 |     39.90 
   Strongly agree |     36.21      86.36       2.58      15.38      25.00      57.00 |     37.34 
------------------+------------------------------------------------------------------+----------
            Total |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 


                  |         party
            ref_2 |       500       1000 |     Total
------------------+----------------------+----------
Strongly disagree |     15.74      18.18 |      7.96 
Somewhat disagree |     21.31      31.82 |     14.80 
   Somewhat agree |     34.66      36.36 |     39.90 
   Strongly agree |     28.29      13.64 |     37.34 
------------------+----------------------+----------
            Total |    100.00     100.00 |    100.00 

. 
. sum ref_2 if (year == 2017 & party ==  1), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs               2,730
25%            3              1       Sum of wgt.       2,730

50%            3                      Mean           3.232234
                        Largest       Std. dev.       .752853
75%            4              4
90%            4              4       Variance       .5667876
95%            4              4       Skewness      -.8072241
99%            4              4       Kurtosis       3.403345

. sum ref_2 if (year == 2017 & party ==  2), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs               3,172
25%            3              1       Sum of wgt.       3,172

50%            3                      Mean           2.998739
                        Largest       Std. dev.      .7885964
75%            4              4
90%            4              4       Variance       .6218842
95%            4              4       Skewness      -.5611683
99%            4              4       Kurtosis       3.033999

. sum ref_2 if (year == 2017 & party ==  3), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            2              1       Obs               3,563
25%            2              1       Sum of wgt.       3,563

50%            3                      Mean           2.882122
                        Largest       Std. dev.      .8004931
75%            3              4
90%            4              4       Variance       .6407892
95%            4              4       Skewness      -.4253174
99%            4              4       Kurtosis       2.814044

. sum ref_2 if (year == 2017 & party ==  4), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            3              1       Obs               1,601
25%            3              1       Sum of wgt.       1,601

50%            4                      Mean           3.530294
                        Largest       Std. dev.      .6949734
75%            4              4
90%            4              4       Variance        .482988
95%            4              4       Skewness      -1.466118
99%            4              4       Kurtosis       4.820742

. sum ref_2 if (year == 2017 & party ==  5), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            2              1
 5%            3              1
10%            3              1       Obs               1,840
25%            3              1       Sum of wgt.       1,840

50%            4                      Mean           3.702717
                        Largest       Std. dev.      .5470701
75%            4              4
90%            4              4       Variance       .2992857
95%            4              4       Skewness      -2.019137
99%            4              4       Kurtosis       7.847929

. sum ref_2 if (year == 2017 & party ==  6), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            3              1
10%            3              1       Obs                 738
25%            3              1       Sum of wgt.         738

50%            4                      Mean           3.650407
                        Largest       Std. dev.      .6028031
75%            4              4
90%            4              4       Variance       .3633716
95%            4              4       Skewness      -1.857129
99%            4              4       Kurtosis       6.746644

. sum ref_2 if (year == 2017 & party ==  7), d 

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            2              1
10%            2              1       Obs                 928
25%            3              1       Sum of wgt.         928

50%            3                      Mean           3.217672
                        Largest       Std. dev.      .7059847
75%            4              4
90%            4              4       Variance       .4984144
95%            4              4       Skewness      -.6664961
99%            4              4       Kurtosis       3.381037

. sum ref_2 if (year == 2017 & party == 10), d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            1              1       Obs               1,396
25%            1              1       Sum of wgt.       1,396

50%            1                      Mean           1.638252
                        Largest       Std. dev.      .7907699
75%            2              4
90%            3              4       Variance       .6253171
95%            3              4       Skewness       1.049607
99%            4              4       Kurtosis        3.34894

. 
. * all parties mean and standard deviation
. 
. sum ref_2 if year == 2012, d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            2              1       Obs              19,330
25%            2              1       Sum of wgt.      19,330

50%            3                      Mean           2.871961
                        Largest       Std. dev.      .8889997
75%            4              4
90%            4              4       Variance       .7903204
95%            4              4       Skewness      -.4191869
99%            4              4       Kurtosis       2.437104

. sum ref_2 if year == 2017, d

                            ref_2
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            2              1       Obs              16,740
25%            3              1       Sum of wgt.      16,740

50%            3                      Mean           3.066069
                        Largest       Std. dev.      .9141057
75%            4              4
90%            4              4       Variance       .8355892
95%            4              4       Skewness      -.7562797
99%            4              4       Kurtosis        2.75911

. 
. *******************************************************************************
. 
. *** TABLE A7
. 
. clear

. 
. import excel "data_src_Munivotes_artificial_2000-.xlsx", sheet("Sheet 1") firstrow
(19 vars, 1,475 obs)

. 
. rename New_name muni

. 
. merge m:1 muni using "data_src_Municodes.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             1,475  (_merge==3)
    -----------------------------------------

. drop _merge

. destring Year, replace
Year: all characters numeric; replaced as int

. 
. gen treat = 0

. replace treat = 1 if (Treated2015 == 1 & Year > 2015)
(85 real changes made)

. 
. gen percent_pop_arrivals = refugees_per_capita * 100

. 
. * SDP, Social Democrats
. 
. xtset municode

Panel variable: municode (balanced)

. reg SDPshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =      20.54
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0165
                                                Root MSE          =     .09576

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                   SDPshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |  -.0031233   .0049605    -0.63   0.529    -.0128892    .0066426
                            |
                       Year |
                      2004  |   .0078567   .0020657     3.80   0.000     .0037899    .0119234
                      2008  |  -.0071591   .0028035    -2.55   0.011    -.0126785   -.0016397
                      2012  |  -.0262511   .0028249    -9.29   0.000    -.0318126   -.0206896
                      2017  |  -.0182404   .0034801    -5.24   0.000    -.0250918    -.011389
                            |
Year#c.percent_pop_arrivals |
                      2004  |   .0018609   .0014387     1.29   0.197    -.0009715    .0046933
                      2008  |   .0043473   .0016219     2.68   0.008     .0011542    .0075404
                      2012  |   .0017979   .0022512     0.80   0.425    -.0026341      .00623
                      2017  |   .0021832   .0036948     0.59   0.555    -.0050909    .0094573
                            |
                      _cons |   .1918593   .0064341    29.82   0.000     .1791923    .2045263
---------------------------------------------------------------------------------------------

. 
. * KOK, National Coalition
. 
. xtset municode

Panel variable: municode (balanced)

. reg KOKshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =      17.72
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0214
                                                Root MSE          =     .09443

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                   KOKshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |  -.0063811   .0038775    -1.65   0.101    -.0140149    .0012526
                            |
                       Year |
                      2004  |   .0057735   .0020144     2.87   0.004     .0018078    .0097393
                      2008  |   .0243443   .0030382     8.01   0.000     .0183629    .0303257
                      2012  |   .0082651   .0031353     2.64   0.009     .0020925    .0144376
                      2017  |  -.0014318   .0034297    -0.42   0.677    -.0081839    .0053203
                            |
Year#c.percent_pop_arrivals |
                      2004  |  -.0007477   .0014142    -0.53   0.597     -.003532    .0020365
                      2008  |   -.002321   .0020566    -1.13   0.260    -.0063699    .0017279
                      2012  |  -.0016873   .0018898    -0.89   0.373    -.0054077    .0020332
                      2017  |  -.0051484   .0023596    -2.18   0.030    -.0097939   -.0005029
                            |
                      _cons |   .1559806   .0062106    25.12   0.000     .1437537    .1682075
---------------------------------------------------------------------------------------------

. 
. * Center, KESK
. 
. xtset municode

Panel variable: municode (balanced)

. reg KESKshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =      30.45
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0165
                                                Root MSE          =     .18405

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                  KESKshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |  -.0088268   .0114229    -0.77   0.440    -.0313153    .0136617
                            |
                       Year |
                      2004  |  -.0055425   .0025794    -2.15   0.033    -.0106206   -.0004645
                      2008  |  -.0389402    .003784   -10.29   0.000      -.04639   -.0314905
                      2012  |  -.0548764   .0039224   -13.99   0.000    -.0625985   -.0471543
                      2017  |  -.0537889    .004306   -12.49   0.000    -.0622661   -.0453116
                            |
Year#c.percent_pop_arrivals |
                      2004  |  -.0004359   .0023418    -0.19   0.852    -.0050462    .0041743
                      2008  |   .0038376   .0027239     1.41   0.160     -.001525    .0092001
                      2012  |    .005782   .0026856     2.15   0.032     .0004948    .0110693
                      2017  |   .0039797   .0022755     1.75   0.081    -.0005002    .0084595
                            |
                      _cons |   .4126511   .0126856    32.53   0.000     .3876767    .4376254
---------------------------------------------------------------------------------------------

. 
. * PS, Finns Party
. 
. xtset municode

Panel variable: municode (balanced)

. reg psshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =     165.44
                                                Prob > F          =     0.0000
                                                R-squared         =     0.4468
                                                Root MSE          =     .04961

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                    psshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |   .0011813   .0025892     0.46   0.649    -.0039161    .0062788
                            |
                       Year |
                      2004  |   .0014101   .0008856     1.59   0.112    -.0003334    .0031536
                      2008  |    .035409   .0024565    14.41   0.000     .0305729    .0402451
                      2012  |   .1138938   .0032532    35.01   0.000     .1074891    .1202985
                      2017  |   .0773341   .0030277    25.54   0.000     .0713734    .0832947
                            |
Year#c.percent_pop_arrivals |
                      2004  |  -.0005274   .0005127    -1.03   0.305    -.0015367     .000482
                      2008  |  -.0030982   .0016847    -1.84   0.067    -.0064149    .0002186
                      2012  |  -.0007981    .003159    -0.25   0.801    -.0070174    .0054211
                      2017  |   .0013196   .0027639     0.48   0.633    -.0041218     .006761
                            |
                      _cons |   .0138407   .0024359     5.68   0.000     .0090451    .0186364
---------------------------------------------------------------------------------------------

. 
. * VAS, Left Alliance
. 
. xtset municode

Panel variable: municode (balanced)

. reg VASshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =      14.94
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0149
                                                Root MSE          =     .07301

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                   VASshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |   .0002154   .0047334     0.05   0.964    -.0091033    .0095342
                            |
                       Year |
                      2004  |  -.0035292   .0018788    -1.88   0.061    -.0072281    .0001697
                      2008  |  -.0091898   .0020524    -4.48   0.000    -.0132305   -.0051491
                      2012  |  -.0241338   .0024295    -9.93   0.000    -.0289169   -.0193507
                      2017  |  -.0176986   .0027056    -6.54   0.000    -.0230251   -.0123721
                            |
Year#c.percent_pop_arrivals |
                      2004  |   .0013646   .0011398     1.20   0.232    -.0008792    .0036085
                      2008  |   .0024617   .0015961     1.54   0.124    -.0006806    .0056039
                      2012  |   .0033006   .0015062     2.19   0.029     .0003354    .0062658
                      2017  |   .0003552   .0018517     0.19   0.848    -.0032902    .0040007
                            |
                      _cons |   .0882559   .0049665    17.77   0.000     .0784782    .0980337
---------------------------------------------------------------------------------------------

. 
. * Greens
. 
. xtset municode

Panel variable: municode (balanced)

. reg greenshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =      14.23
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0537
                                                Root MSE          =      .0376

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                 greenshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |  -.0012011   .0014101    -0.85   0.395    -.0039772    .0015749
                            |
                       Year |
                      2004  |  -.0021948   .0012303    -1.78   0.076    -.0046169    .0002273
                      2008  |   .0043899   .0015956     2.75   0.006     .0012486    .0075311
                      2012  |   .0048223   .0018423     2.62   0.009     .0011953    .0084493
                      2017  |   .0234628   .0027913     8.41   0.000     .0179674    .0289582
                            |
Year#c.percent_pop_arrivals |
                      2004  |   .0006606    .000723     0.91   0.362    -.0007627    .0020839
                      2008  |   .0001724   .0014515     0.12   0.906    -.0026852      .00303
                      2012  |  -.0009794   .0012355    -0.79   0.429    -.0034117    .0014528
                      2017  |  -.0024118   .0013188    -1.83   0.069    -.0050081    .0001846
                            |
                      _cons |   .0232171   .0022189    10.46   0.000     .0188487    .0275856
---------------------------------------------------------------------------------------------

. 
. * KD, Christian Democrats
. 
. xtset municode

Panel variable: municode (balanced)

. reg KDShare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =       4.27
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0053
                                                Root MSE          =     .04219

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                    KDShare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |   .0008977   .0023002     0.39   0.697    -.0036307    .0054261
                            |
                       Year |
                      2004  |  -.0036848    .001378    -2.67   0.008    -.0063976   -.0009719
                      2008  |  -.0013204     .00177    -0.75   0.456     -.004805    .0021642
                      2012  |  -.0045342   .0019492    -2.33   0.021    -.0083716   -.0006967
                      2017  |  -.0001975   .0021977    -0.09   0.928    -.0045241     .004129
                            |
Year#c.percent_pop_arrivals |
                      2004  |    .000221   .0007042     0.31   0.754    -.0011653    .0016073
                      2008  |   .0013613    .001023     1.33   0.184    -.0006527    .0033752
                      2012  |   .0002864   .0008852     0.32   0.747    -.0014564    .0020291
                      2017  |   .0020865   .0013957     1.49   0.136    -.0006613    .0048343
                            |
                      _cons |    .038424    .002843    13.52   0.000      .032827    .0440211
---------------------------------------------------------------------------------------------

. 
. * Swedish People's Party SFP** 
. 
. xtset municode

Panel variable: municode (balanced)

. reg RKPshare c.percent_pop_arrivals##i.Year if Pretreated==0, cl(municode) 

Linear regression                               Number of obs     =      1,365
                                                F(9, 272)         =       1.31
                                                Prob > F          =     0.2297
                                                R-squared         =     0.0108
                                                Root MSE          =     .14721

                                            (Std. err. adjusted for 273 clusters in municode)
---------------------------------------------------------------------------------------------
                            |               Robust
                   RKPshare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
       percent_pop_arrivals |   .0130939   .0147386     0.89   0.375    -.0159223    .0421102
                            |
                       Year |
                      2004  |   .0001875   .0004575     0.41   0.682    -.0007132    .0010881
                      2008  |  -.0013614   .0011798    -1.15   0.250    -.0036841    .0009613
                      2012  |   -.001636   .0012652    -1.29   0.197    -.0041267    .0008548
                      2017  |  -.0012314   .0013083    -0.94   0.347     -.003807    .0013442
                            |
Year#c.percent_pop_arrivals |
                      2004  |  -.0000159   .0004466    -0.04   0.972    -.0008951    .0008632
                      2008  |   -.000848   .0007184    -1.18   0.239    -.0022624    .0005663
                      2012  |  -.0009209   .0008514    -1.08   0.280     -.002597    .0007553
                      2017  |  -.0006057   .0009107    -0.67   0.507    -.0023988    .0011873
                            |
                      _cons |   .0355108   .0097502     3.64   0.000     .0163154    .0547062
---------------------------------------------------------------------------------------------

. 
. 
. 
. 
end of do-file

. log close
      name:  <unnamed>
       log:  code_05_Stata_Tables_A1_A2_A7.log
  log type:  text
 closed on:   8 Nov 2022, 21:55:10
--------------------------------------------------------------------------------------------------------
